<template>
  <header>
    <div class="header_in tanxing">
      <div class="logo tanxing">
        <span><img src="../assets/log.png" alt="" /></span>
        <a href="/#/">网易云音乐</a>
      </div>
      <ul class="tanxing">
        <li class="active" @click="$router.push('/')">
          发现音乐 <span></span>
        </li>
        <li @click="$router.push('/mymusic')">我的音乐</li>
        <li @click="$router.push('/guanzhu')">关注</li>
        <li @click="$router.push('/shop')">商城</li>
        <li @click="$router.push('/star')">音乐人</li>
        <li @click="$router.push('/get')">下载客户端</li>
      </ul>
      <div class="ipt tanxing">
        <i class="iconfont icon-sousuo"></i>
        <input type="text" placeholder="音乐/视频/电台/用户" />
      </div>
      <span>创作者众人</span>
      <div class="btn_login" @click="change">登陆</div>
    </div>
  </header>
</template>

<script>
import { mapState, mapMutations } from 'vuex'
export default {
  data() {
    return {

    }
  },
  methods: {
    ...mapMutations(["change"])
  },
}
</script>
 
<style lang = "less" scoped>
@import "../assets/base.less";
header {
  height: 70px;
  background: #242424;
  border-bottom: 1px solid #000;
  position: relative;
  .header_in {
    width: 1100px;
    margin: 0 auto;
    .logo {
      height: 70px;
      border-top: 1px saddlebrown solid;
      span {
        margin-top: 20px;
        display: block;
        height: 32px;
        width: 32px;
        border-radius: 50%;
        overflow: hidden;
        img {
          width: 100%;
        }
      }
      a {
        margin-left: 5px;
        width: 157px;
        height: 100%;
        padding-right: 20px;
        color: #fff;
        text-decoration: none;
        font-size: 22px;
        line-height: 70px;
      }
    }
  }
  ul {
    li {
      position: relative;
      cursor: pointer;
      font-size: 14px;
      color: #ccc;
      padding: 0 19px;
      line-height: 70px;
      &:hover {
        background-color: #000;
        color: #fff;
      }
      &.active {
        background-color: #000;
        color: #fff;
      }
      span {
        position: absolute;
        left: 25px;
        bottom: -3px;
        // display: block;
        // background-color: #fff;

        /*宽高为0*/
        width: 0;
        height: 0;
        border: 8px solid transparent;
        border-bottom: 8px solid #c20c0c;
      }
    }
  }
  .ipt {
    margin-top: 19px;
    width: 158px;
    height: 32px;
    background-color: #fff;
    border-radius: 32px;
    overflow: hidden;
    line-height: 32px;
    padding: 0 2px;
    input {
      background-color: #fff;
      border: none;
      font-size: 12px;
      margin-left: 5px;
      color: #9b9b9b;
      &:focus {
        outline: none;
        color: #000;
      }
    }
    .icon-sousuo {
      font-size: 14px;
      color: #9b9b9b;
    }
  }
  span {
    display: block;
    width: 90px;
    height: 32px;
    border-radius: 20px;
    text-align: center;
    line-height: 32px;
    margin: 19px 0 0 12px;
    font-size: 12px;
    color: #ccc;
    border: 1px solid #4f4f4f;
    cursor: pointer;
    &:hover {
      border: 1px solid #fff;
      color: #fff;
    }
  }
  .btn_login {
    color: #787878;
    font-size: 12px;
    line-height: 70px;
    cursor: pointer;
  }
}
</style>